<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%><%--
--%><%@ include file="/include/taglib.jsp"%>
<html>
<head> 
<title>${modelName} ${fn:escapeXml(item.name)}</title>
</head>
<body>
	<script type="text/javascript">
	$( '#${pageId}' ).bind( 'pageinit',function(event){
		$('#${modelName}_${item.id}_photo').uploadify({
		    'swf'      : '/plugin/uploadify/uploadify.swf'
		    , 'uploader' : '/page/item/${modelName}/${modelName}UploadPhoto.jsp'
		    , 'formData'      : {'itemModelName' : '${modelName}', 'itemId' : ${item.id}}
	    	, 'buttonText' : 'Upload Photos'
		});
	});
	</script>
	
	<h1>${modelName}</h1>
	<jsp:include page="/fragment/Item.jsp"/>
	
	<div class="slideshow">
		<c:forEach var="image" items="${item.photos}" varStatus="status">
			<div class="splashBox" id="splashBox_${status.index}">
				<div class="imageBox">
					<img src="${image.uri}" />
				</div>
				<div class="clearBoth"></div>
			</div>
		</c:forEach>
	</div>
	<c:if test="${not empty user or not empty guest and guestEmail == outfitterEmail}">
		<input type="file" id="${modelName}_${item.id}_photo" name="fileData"/>
		<ol id="list_${modelName}_photos" class="edit">
			<c:forEach var="photo" items="${item.photos}" varStatus="status">
				<li id="${modelName}_${photo.id}">
					<div>
						<a class="floatLeft delete" href="javascript:deleteModelRedirect('Photo', ${photo.id}, '/model/${modelName}/view/${item.id}')">
							<img src="/image/trash.png">
						</a>
						<div class="floatLeft">
							<a href="${photo.uri}"> <img src="${photo.uriPrefix}75${photo.uriSuffix}" />
							</a>
						</div>
						<div style="clear: left;"></div>
					</div>
				</li>
			</c:forEach>
		</ol>
	</c:if>
</body>
</html>
